package edu.uis.project.frankszoo.model.game;

/**
 * This class represents every player in the game including those that are not active in a hand
 * 
 */
public class GamePlayer {

	protected String playerName; // The name of the player
	protected String playerID; // The ID of the player
	protected boolean isActive;// Whether the player is active in a hand or has already runs out of cards

	/**
	 * This is the constructor for the GamePlayer class
	 * 
	 * @param playerName
	 *            The name of the player
	 * @param playerID
	 *            The ID of the player
	 * @param isActive
	 *            Whether the player is active in a hand or has already runs out of cards
	 */
	public GamePlayer(String playerName, String playerID, boolean isActive) {
		this.playerName = playerName;
		this.playerID = playerID;
		this.isActive = isActive;
	}

	/**
	 * Gets the name of this player
	 * 
	 * @return playerName
	 */
	public String getPlayerName() {
		return this.playerName;
	}

	/**
	 * Gets the ID of this player
	 * 
	 * @return playerID The playerID of this player
	 */
	public String getPlayerID() {
		return this.playerID;
	}

	/**
	 * Changes the value of isActive to the active status of this player
	 * 
	 * @param isActive
	 *            Whether the player is active in a hand or has already runs out of cards
	 */
	public void setIsActive(boolean isActive) {
		this.isActive = isActive;
	}

	/**
	 * Gets the active status of this player
	 * 
	 * @return the value of isActive variable of this player
	 */
	public boolean getIsActive() {
		return this.isActive;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return playerName;
	}
}
